<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>图书面板</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

    <script src="../../scripts/boot.js" type="text/javascript"></script>


    <style type="text/css">
        html,
        body {
            padding: 0;
            margin: 0;
            border: 0;
            height: 100%;
            overflow: hidden;
        }

        .asLabel .mini-textbox-border,
        .asLabel .mini-textbox-input,
        .asLabel .mini-buttonedit-border,
        .asLabel .mini-buttonedit-input,
        .asLabel .mini-textboxlist-border {
            border: 0;
            background: none;
            cursor: default;
        }

        .asLabel .mini-buttonedit-buttons,
        .asLabel .mini-buttonedit-button,
        .asLabel .mini-textboxlist-close {
            display: none;
        }

        .asLabel .mini-textboxlist-item {
            padding-right: 8px;
        }
    </style>
</head>

<body>
 
    <fieldset id="bookinfodetail" style="width:490px;border:solid 1px #aaa;position:relative;">
        <legend>员工详细信息</legend>
        <div style="padding-left:11px;padding-bottom:5px;">
            <table style="table-layout:fixed;">
                <tr>
                    <td style="width:80px;">图书名称：</td>
                    <td style="width:150px;">
                        <input name="bookName" class="mini-textbox" readonly="true" />
                    </td>
                    <td style="width:80px;">图书类别：</td>
                    <td style="width:150px;">
                        <input name="bookType" class="mini-textbox" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td>出版社：</td>
                    <td>
                        <input name="publisher" class="mini-textbox" readonly="true" />
                    </td>
                    <td>作者：</td>
                    <td>
                        <input name="author" class="mini-textbox" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td>剩余数量：</td>
                    <td>
                        <input name="remain" class="mini-textbox" readonly="true" />
                    </td>
                </tr>

            </table>
    </fieldset>
    <script type="text/javascript">
        mini.parse();

        // 添加信息展示样式
        var form = new mini.Form("bookinfodetail");
        var fields = form.getFields();
            for (var i = 0, l = fields.length; i < l; i++) {
                var c = fields[i];
                if (c.setReadOnly) c.setReadOnly(true);     //只读
                if (c.setIsValid) c.setIsValid(true);      //去除错误提示
                if (c.addCls) c.addCls("asLabel");          //增加asLabel外观
            }
		// 回显数据
        function SetData(data) {
            //跨页面传递的数据对象，克隆后才可以安全使用
            data = mini.clone(data);

            $.ajax({
                url: "../../bookinfoeditaction",
                cache: false,
                data: {
                    bookId: data.id,
                },
                success: function (text) {
                    var o = mini.decode(text);
                    form.setData(o);
                    form.setChanged(false);
                }
            });
        }
    </script>
</body>

</html>